PROJECT(global_thread_pool)

file(GLOB_RECURSE PROJECT_ROOT_FILES ${PROJECT_SOURCE_DIR}/*.h ${PROJECT_SOURCE_DIR}/*.c ${PROJECT_SOURCE_DIR}/*.cpp)

set(
    ALL_FILES 
    ${PROJECT_ROOT_FILES}
)

source_group(TREE ${CMAKE_SOURCE_DIR}/src FILES ${ALL_FILES})

if ("${STR_SYSTEM}" STREQUAL "windows")
    add_definitions(-D_API_GLOBAL_THREAD_POOL_EXPORT)
endif()

add_library(
    ${PROJECT_NAME} SHARED
    ${ALL_FILES}
)

INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/util/include")
